const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  publicPath: './',
  outputDir: 'dist',
  devServer: {
    open: true,         // 是否自动弹出浏览器页面
    host: "localhost",  // 默认本地地址
    port: 9001,         // 默认服务启动端口
    proxy: {
      '/api': {
        // target: 'http://127.0.0.1:8000',
        target: 'http://192.168.1.100:8000',
        changOrigin: true, //设置允许跨域
        pathRewrite: {
          '/api': '/'
        }
      }
    },
  },
  configureWebpack: {
    resolve: {
      fallback: {
        fs: false,
        crypto: false,
        path:false
      }
    }
  }
})
